package io.renren.sf.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.sf.dao.HzCopybookCharacterInformationDao;
import io.renren.sf.entity.HzCopybookCharacterInformationEntity;
import io.renren.sf.service.HzCopybookCharacterInformationService;


@Service("hzCopybookCharacterInformationService")
public class HzCopybookCharacterInformationServiceImpl extends ServiceImpl<HzCopybookCharacterInformationDao, HzCopybookCharacterInformationEntity> implements HzCopybookCharacterInformationService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HzCopybookCharacterInformationEntity> page = this.page(
                new Query<HzCopybookCharacterInformationEntity>().getPage(params),
                new QueryWrapper<HzCopybookCharacterInformationEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public void updateCharacterType(String characterType) {
        this.baseMapper.updateCharacterType(characterType);
    }

    @Override
    public void updateCalligrapher(String calligrapher) {
        this.baseMapper.updateCalligrapher(calligrapher);
    }

    @Override
    public void updateAllRelatedCharacterName(long cid, String copybookCharacterName) {
        this.baseMapper.updateAllRelatedCharacterName(cid, copybookCharacterName);
    }

}